#!/bin/env/python3
import logging


class Config(object):
    DEBUG = True
    SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:3254983@zhangtiantian.cc/db_tk"
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True

    # redis
    REDIS_HOST = "zhangtiantian.cc"
    REDIS_PORT = 6379

    LEVEL_NAME = logging.DEBUG


class DevelopConfig(Config):
    pass


# 生产环境
class ProductConfig(Config):
    DEBUG = False
    LEVEL_NAME = logging.ERROR


# 提供一个访问接口
config_dict = {
    "develop": DevelopConfig,
    "product": ProductConfig,
}
